import _axios from "@/plugins/axios";

// 新政区划查询
export function countryAddressList(pid) {
  return _axios({
    url: "/base/division/state",
    method: "get",
    params: {
      pid, // 父级ID
    },
  }).then((res) => {
    res.result = res.result.map(item => {
      item.nameLocal = item.nameLocal || item.nameEn
      return item
    })
    return res
  });
}
// 新政区划查询
export function cityApiList(pid) {
  return _axios({
    url: "/base/division/city",
    method: "get",
    params: {
      pid, // 父级ID
    },
  }).then((res) => {
    res.result = res.result.map(item => {
      item.nameLocal = item.nameLocal || item.nameEn
      return item
    })
    return res
  });
}
